//
//  BaseViewController.m
//  Ting
//
//  Created by 安静的美男子 on 14/11/13.
//  Copyright (c) 2014年 安静的美男子. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    if (!_downView) {
        self.downView = [[UIView alloc]initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height - 44, [UIScreen mainScreen].bounds.size.width, 44)];
        self.Find = [UIButton buttonWithType:UIButtonTypeCustom];
        self.Find.frame = CGRectMake(0, 0, 64, 44);
        [self.downView addSubview:_Find];
        self.information = [UIButton buttonWithType:UIButtonTypeCustom];
        self.information.frame = CGRectMake(_Find.frame.size.width, 0, 64, 44);
        [self.downView addSubview:_information];
        self.album = [UIButton buttonWithType:UIButtonTypeCustom];
        self.album.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - _Find.frame.size.width * 2, 0, 64, 44);
        [self.downView addSubview:_album];
        self.setting = [UIButton buttonWithType:UIButtonTypeCustom];
        self.setting.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - _Find.frame.size.width, 0, 64, 44);
        [self.downView addSubview:_setting];
        self.Find.backgroundColor = [UIColor blackColor];
        [self.Find setTitle:@"发现" forState:UIControlStateNormal];
        
        self.information.backgroundColor = [UIColor blackColor];
        [self.information setTitle:@"播主" forState:UIControlStateNormal];
        
        self.album.backgroundColor = [UIColor blackColor];
        [self.album setTitle:@"下载" forState:UIControlStateNormal];
        
        self.setting.backgroundColor = [UIColor blackColor];
        [self.setting setTitle:@"我" forState:UIControlStateNormal];
        
        [self.view addSubview:_downView];
        
        
        [self.Find addTarget:self action:@selector(GotoFind) forControlEvents:UIControlEventTouchUpInside];
        
        [self.information addTarget:self action:@selector(GotoInformation) forControlEvents:UIControlEventTouchUpInside];
        [self.album addTarget:self action:@selector(GotoAlbum) forControlEvents:UIControlEventTouchUpInside];
        [self.setting addTarget:self action:@selector(GotoSetting) forControlEvents:UIControlEventTouchUpInside];
    }
    
    return;


    // Do any additional setup after loading the view.
}
-(void)GotoFind
{
    
}
-(void)GotoSetting
{
}
-(void)GotoAlbum
{
}
-(void)GotoPlay
{
}

-(void)GotoInformation
{
}


-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
//    if (!_downView) {
//        self.downView = [[UIView alloc]initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height - 50, [UIScreen mainScreen].bounds.size.width, 50)];
//        self.Find = [UIButton buttonWithType:UIButtonTypeCustom];
//        self.Find.frame = CGRectMake(0, 0, 60, 50);
//        [self.downView addSubview:_Find];
//        self.information = [UIButton buttonWithType:UIButtonTypeCustom];
//        self.information.frame = CGRectMake(_Find.frame.size.width, 0, 60, 50);
//        [self.downView addSubview:_information];
//        self.play = [UIButton buttonWithType:UIButtonTypeCustom];
//        self.play.frame = CGRectMake(_Find.frame.size.width * 2, 0, 80, 50);
//        [self.downView addSubview:_play];
//        self.album = [UIButton buttonWithType:UIButtonTypeCustom];
//        self.album.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - _Find.frame.size.width * 2, 0, 60, 50);
//        [self.downView addSubview:_album];
//        self.setting = [UIButton buttonWithType:UIButtonTypeCustom];
//        self.setting.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - _Find.frame.size.width, 0, 60, 50);
//        [self.downView addSubview:_setting];
//        self.Find.backgroundColor = [UIColor redColor];
//        self.information.backgroundColor = [UIColor yellowColor];
//        self.play.backgroundColor = [UIColor greenColor];
//        self.album.backgroundColor = [UIColor cyanColor];
//        self.setting.backgroundColor = [UIColor blackColor];
//        [self.view addSubview:_downView];
//        
//    }
//    return;
//

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
